package com.easyCode.realExampleOne;

import com.easyCode.dataMock.anno.FieldMock;
import com.easyCode.dataMock.anno.TableMock;
import com.easyCode.dataMock.constants.DefaultDictConstants;
import com.easyCode.dataMock.constants.MockRuleConstants;
import com.easyCode.dataMock.constants.RandomRuleConstants;
import com.easyCode.sqlBuilder.constants.DefaultValConstants;
import com.easyCode.sqlBuilder.constants.KeyTypeConstants;
import com.easyCode.sqlBuilder.oop.Filed;
import com.easyCode.sqlBuilder.oop.Key;
import com.easyCode.sqlBuilder.oop.Table;
import java.time.LocalDateTime;

/**
 * @author 大忽悠
 * @create 2023/1/17 22:25
 */
@Table(comment = "学生表")
@TableMock(mockNum = 10)
public class Stu {
    @Key(keyType = KeyTypeConstants.PRIMARY_KEY)
    @Filed(comment = "主键id", autoIncrement = true)
    @FieldMock(rule = MockRuleConstants.INCREMENT,extra = {"5000","2"})
    private Integer id;
    @Filed(comment = "姓名")
    @FieldMock(rule = MockRuleConstants.RANDOM, extra = RandomRuleConstants.NAME)
    private String name;
    @Filed(comment = "年龄")
    @FieldMock(rule = MockRuleConstants.RANDOM, extra = {RandomRuleConstants.INT,"1","25"})
    private Integer age;
    @Filed(comment = "就读大学")
    @FieldMock(rule = MockRuleConstants.DICT, extra = DefaultDictConstants.UNIVERSITY_DICT)
    private String university;
    @Filed(comment = "主攻编程语言")
    @FieldMock(rule = MockRuleConstants.DICT,extra = DefaultDictConstants.LANGUAGE_DICT)
    private String language;
    @Filed(comment = "老家城市")
    @FieldMock(rule = MockRuleConstants.DICT, extra = DefaultDictConstants.CITY_DICT)
    private String homeCity;
    @Filed(comment = "电话号码")
    @FieldMock(rule = MockRuleConstants.RANDOM, extra = RandomRuleConstants.PHONE)
    private String phoneNumber;
    @Filed(comment = "qq邮箱号码")
    @FieldMock(rule = MockRuleConstants.RULE, extra = "[1-9][0-9]{8,10}\\@[q][q]\\.[c][o][m]")
    private String qqEamil;
    @Filed(comment = "出生日期")
    @FieldMock(rule = MockRuleConstants.RANDOM, extra = {RandomRuleConstants.DATE,"2000-01-01 00:00:00","2004-01-01 00:00:00"})
    private LocalDateTime birthTime;
    @Filed(comment = "创建时间", defaultVal = DefaultValConstants.CURRENT_TIMESTAMP)
    private LocalDateTime createTime;
    @Filed(comment = "修改时间", defaultVal = DefaultValConstants.CURRENT_TIMESTAMP)
    private LocalDateTime updateTime;
}
